<?php
declare (strict_types=1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class FetchTaskModel extends Model
{

    protected $table = 'fetch_tasks';

    function url()
    {
        return $this->belongsTo(FetchUrlModel::class, 'fetch_url_id', 'id');
    }

    function logs()
    {
        return $this->hasMany(FetchLogModel::class, 'fetch_task_id', 'id');
    }
}
